2.6 Give an example to show that private visibility is more restrictive than default visibility. Give an example to show that default visibility is more restrictive than protected visibility. Give an example to show that protected visibility is more restrictive than public visibility. In each case, test your code to make sure that the more restrictive choice generates a compile-time error message. No error message should be generated for the less restrictive choice.
 
 
View Solution
 
 
 
<< Back Next >>